-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(dropdown): memoize floating ui ref to prevent max call depth #17002
fix(dropdown): memoize floating ui ref to prevent max call depth #17002
Conversation
Signed-off-by: Edward Rojas <[email protected]>
All contributors have signed the DCO. |
✅ Deploy Preview for v11-carbon-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
I have read the DCO document and I hereby sign the DCO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this, submitting the fix, and testing it! Since it's so close to that other PR and you've said it fixes your test case, I think this looks good to merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
1be65d7
…bon-design-system#17002) Signed-off-by: Edward Rojas <[email protected]> Co-authored-by: Taylor Jones <[email protected]>
…bon-design-system#17002) Signed-off-by: Edward Rojas <[email protected]> Co-authored-by: Taylor Jones <[email protected]>
…bon-design-system#17002) Signed-off-by: Edward Rojas <[email protected]> Co-authored-by: Taylor Jones <[email protected]>
…bon-design-system#17002) Signed-off-by: Edward Rojas <[email protected]> Co-authored-by: Taylor Jones <[email protected]>
…bon-design-system#17002) Signed-off-by: Edward Rojas <[email protected]> Co-authored-by: Taylor Jones <[email protected]>
…bon-design-system#17002) Signed-off-by: Edward Rojas <[email protected]> Co-authored-by: Taylor Jones <[email protected]>
Closes #17001
Applies similar approach as for the Combobox component (in #16866) to memoize the value of
getMenuProps
to avoid an infinite loop.Changelog
Changed
getMenuProps
inuseMemo
Testing / Reviewing
Note: The fix was validated in an existing app by applying a patch.